package com.mh.study.dubbo.service.impl;

import com.mh.study.dubbo.service.HelloService;
import org.apache.dubbo.config.annotation.Service;

/**
 * 注意这里的service是dubbo的service
 * 不是spring的service我被坑过，消费端一直找到不服务，就是这个service惹的祸
 * 万恶的同名注解
 *
 * @author MH
 * @since 2022-01-11
 */

@Service
public class HelloServiceImpl implements HelloService {
    @Override
    public String sayHello(String name, int timeToWait) {
        try {
            Thread.sleep(timeToWait);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "Hello " + name;
    }
}
